/**
 * @file Beep.h
 ******************************************************************************
 * Copyright (c) 2024 - ~, SCUT-RobotLab Development Team
 * @file    Beep.h
 * @author  Jasper
 * @brief   Header file
 ******************************************************************************
 * @attention
 *
 * if you had modified this file, please make sure your code does not have many
 * bugs, update the version Number, write dowm your name and the date, the most
 * important is make sure the users will have clear and definite understanding
 * through your new brief.
 *
 * <h2><center>&copy; Copyright (c) 2024 - ~, SCUT-RobotLab Development Team.
 * All rights reserved.</center></h2>
 ******************************************************************************
 */
#pragma once
#include "HeadFiles\SysFunVarDefine.h"

#ifdef __cplusplus
extern "C"
{
#endif
    /* Includes ------------------------------------------------------------------*/

#define Sound_Time 75            // %
#define Bpm_Qingrigongjianhua 80 // 该设置
    /* Private macros ------------------------------------------------------------*/

    /* Private type --------------------------------------------------------------*/

    /* Exported macros -----------------------------------------------------------*/

    /* Exported types ------------------------------------------------------------*/

    typedef enum
    {
        Do_0 = 16,     // 低音C
        Do_0up = 17,   // 低音C#
        Re_0 = 18,     // 低音D
        Re_0up = 19,   // 低音D#
        Mi_0 = 20,     // 低音E
        Fa_0 = 22,     // 低音F
        Fa_0up = 23,   // 低音F#
        So_0 = 25,     // 低音G
        So_0up = 26,   // 低音G#
        La_0 = 28,     // 低音A
        La_0up = 29,   // 低音A#
        Ti_0 = 31,     // 低音B
        Do_1 = 33,     // 中央C
        Do_1up = 35,   // C#
        Re_1 = 37,     // D
        Re_1up = 39,   // D#
        Mi_1 = 41,     // E
        Fa_1 = 44,     // F
        Fa_1up = 46,   // F#
        So_1 = 49,     // G
        So_1up = 52,   // G#
        La_1 = 55,     // A
        La_1up = 58,   // A#
        Ti_1 = 62,     // B
        Do_2 = 65,     // C
        Do_2up = 69,   // C#
        Re_2 = 73,     // D
        Re_2up = 78,   // D#
        Mi_2 = 82,     // E
        Fa_2 = 87,     // F
        Fa_2up = 93,   // F#
        So_2 = 98,     // G
        So_2up = 104,  // G#
        La_2 = 110,    // A
        La_2up = 117,  // A#
        Ti_2 = 123,    // B
        Do_3 = 131,    // C
        Do_3up = 139,  // C#
        Re_3 = 147,    // D
        Re_3up = 156,  // D#
        Mi_3 = 165,    // E
        Fa_3 = 175,    // F
        Fa_3up = 185,  // F#
        So_3 = 196,    // G
        So_3up = 208,  // G#
        La_3 = 220,    // A
        La_3up = 233,  // A#
        Ti_3 = 247,    // B
        Do_4 = 262,    // C
        Do_4up = 277,  // C#
        Re_4 = 294,    // D
        Re_4up = 311,  // D#
        Mi_4 = 330,    // E
        Fa_4 = 349,    // F
        Fa_4up = 370,  // F#
        So_4 = 392,    // G
        So_4up = 415,  // G#
        La_4 = 440,    // A
        La_4up = 466,  // A#
        Ti_4 = 493,    // B
        Do_5 = 523,    // C
        Do_5up = 554,  // C#
        Re_5 = 587,    // D
        Re_5up = 622,  // D#
        Mi_5 = 659,    // E
        Fa_5 = 698,    // F
        Fa_5up = 740,  // F#
        So_5 = 783,    // G
        So_5up = 830,  // G#
        La_5 = 880,    // A
        La_5up = 932,  // A#
        Ti_5 = 987,    // B
        Do_6 = 1047,   // C
        Do_6up = 1109, // C#
        Re_6 = 1175,   // D
        Re_6up = 1245, // D#
        Mi_6 = 1319,   // E
        Fa_6 = 1397,   // F
        Fa_6up = 1480, // F#
        So_6 = 1568,   // G
        So_6up = 1661, // G#
        La_6 = 1760,   // A
        La_6up = 1865, // A#
        Ti_6 = 1975    // B
    } Typedef_Tone;
    typedef enum
    {
        Qingrigongjianchuang,
        Huagongzhige,
        Molihua,
        NumOfSong
    } Typedef_Song;
    extern unsigned const char R_Qingrigongjianchuang[];
    extern unsigned const char T_Qingrigongjianchuang[];
    extern const unsigned char R_SCUT[];
    extern const unsigned char T_SCUT[];
    extern unsigned char R_Molihua[];
    extern unsigned char T_Molihua[];
    /* Exported function declarations --------------------------------------------*/
    extern unsigned int Volume;
    extern uint16_t beat;
    extern unsigned char Tmp_Count, Tmp_Bit, Music_Enable, Global_Song;
    void Music_Play_Circal(const unsigned char *T_Song, const unsigned char *R_Song);
    void Music_Exit(void);
    void Music_Start(Typedef_Song Tmp_Song);

#ifdef __cplusplus
}
#endif

/************************ COPYRIGHT(C) SCUT-ROBOTLAB **************************/
